//package com.arcvideo.acsconnect.helper;
//
//import android.util.Log;
//
//import com.arcvideo.commondef.CameraTypes;
//
///**
// * @author shenmengchao
// * @version 1.0.0
// * @date 2017/10/19
// * @description
// */
//
//public class ErrorHelper {
//
//    public final static String TAG = "ERROR";
//
//    public static String getErrorMsg(int mainErrorId, int subErrorId) {
//        String errorString = "";
//        switch (mainErrorId) {
//            case CameraTypes.MEDIA_ERR_SENDDATA:                //发送数据错误
//                Log.e(TAG, "onError: error type is MEDIA_ERR_SENDDATA, value = " + subErrorId);
//                errorString = "发送数据错误";
//                break;
//            case CameraTypes.MEDIA_ERR_CONNECTERROR:            //连接错误
//                Log.e(TAG, "onError: error type is MEDIA_ERR_CONNECTERROR, value = " + subErrorId);
//                errorString = "连接错误";
//                break;
//            case CameraTypes.MEDIA_ERR_ENCODEVIDEO:                //视频编码错误
//                Log.e(TAG, "onError: error type is MEDIA_ERR_ENCODEVIDEO, value = " + subErrorId);
//                errorString = "视频编码错误";
//                break;
//            case CameraTypes.MEDIA_ERR_ENCODEAUDIO:                //音频编码错误
//                Log.e(TAG, "onError: error type is MEDIA_ERR_ENCODEAUDIO, value = " + subErrorId);
//                errorString = "音频编码错误";
//                break;
//            case CameraTypes.MEDIA_ERR_STREAMING_N_TIMEOUT:        //连接超时
//                Log.e(TAG, "onError: error type is MEDIA_ERR_STREAMING_N_TIMEOUT, value = " + subErrorId);
//                errorString = "连接超时";
//                break;
//            case CameraTypes.MEDIA_ERR_STREAMING_N_CONNFAIL:    //连接失败
//                Log.e(TAG, "onError: error type is MEDIA_ERR_STREAMING_N_CONNFAIL, value = " + subErrorId);
//                errorString = "连接失败";
//                break;
//            case CameraTypes.MEDIA_ERR_STREAMING_N_RECVTIMEOUT:    //接收数据超时
//                Log.e(TAG, "onError: error type is MEDIA_ERR_STREAMING_N_RECVTIMEOUT, value = " + subErrorId);
//                errorString = "接收数据超时";
//                break;
//            case CameraTypes.MEDIA_ERR_STREAMING_N_RECVFAIL:    //接收数据失败
//                Log.e(TAG, "onError: error type is MEDIA_ERR_STREAMING_N_RECVFAIL, value = " + subErrorId);
//                errorString = "接收数据失败";
//                break;
//            case CameraTypes.MEDIA_ERR_STREAMING_N_SENDTIMEOUT:    //发送数据超时
//                Log.e(TAG, "onError: error type is MEDIA_ERR_STREAMING_N_SENDTIMEOUT, value = " + subErrorId);
//                errorString = "发送数据超时";
//                break;
//            case CameraTypes.MEDIA_ERR_STREAMING_N_SENDFAIL:    //发送数据失败
//                Log.e(TAG, "onError: error type is MEDIA_ERR_STREAMING_N_SENDFAIL, value = " + subErrorId);
//                errorString = "发送数据失败";
//                break;
//            default://其他未知的错误信息
//                Log.e(TAG, "onError: what the Fxxxx!! error is " + mainErrorId + "? code is " + subErrorId);
//                errorString = "其他未知错误";
//                break;
//        }
//        return errorString;
//    }
//
//    public static String getErrorMsg(int res) {
//        String errorInfo = "";
//        Log.dFormat(TAG, "ShowError res = " + res);
//        switch (res) {
//            case CameraTypes.MEDIA_ERR_AUDIOCODEC_UNSUPPORT:
//                errorInfo = "音频不支持！";
//                break;
//            case CameraTypes.MEDIA_ERR_AUDIO_INPUT_OPEN:
//                errorInfo = "音频打开失败！请确认麦克风已授权访问...";
//                break;
//            case CameraTypes.MEDIA_ERR_AUDIO_INPUT_CLOSE:
//                errorInfo = "音频关闭失败！";
//                break;
//            case CameraTypes.MEDIA_ERR_AUDIO_INPUT_RECORDING:
//                errorInfo = "音频录制失败！";
//                break;
//            case CameraTypes.MEDIA_ERR_AUDIO_INPUT_PAUSE:
//                errorInfo = "音频暂停失败！";
//                break;
//            case CameraTypes.MEDIA_ERR_AUDIO_INPUT_STOP:
//                errorInfo = "音频停止失败！";
//                break;
//            case CameraTypes.MEDIA_ERR_VIDEOCODEC_UNSUPPORT:
//                errorInfo = "视频不支持！";
//                break;
//            case CameraTypes.MEDIA_ERR_INVALID_PARAM:
//                errorInfo = "设置参数错误！";
//                break;
//            case CameraTypes.MEDIA_ERR_OPERATION_NOT_SUPPORT:
//                errorInfo = "Publisher操作不支持！";
//                break;
//            case CameraTypes.MEDIA_ERR_NOT_INIT:
//                errorInfo = "Publisher初始化失败！";
//                break;
//            case CameraTypes.MEDIA_ERR_GET_PLUGIN_INPUTSTREAM:
//                errorInfo = "Publisher创建失败！";
//                break;
//            case CameraTypes.MEDIA_ERR_MEM_NOT_ENOUGH:
//                errorInfo = "Publisher内存不足！";
//                break;
//            case CameraTypes.MEDIA_ERR_NOT_READY:
//                errorInfo = "Publisher未准备好！";
//                break;
//            //----------------------
//            case CameraTypes.LICENSE_ERR_DISABLE_APP_NAME:
//                errorInfo = "appname不一致，禁止";
//                break;
//            case CameraTypes.LICENSE_ERR_DISABLE_AUTHENTICATE_FAIL:
//                errorInfo = "验证不通过，禁止";
//                break;
//            case CameraTypes.LICENSE_ERR_DISABLE_INVALID_PARAM:
//                errorInfo = "账号无设置，禁止";
//                break;
//            case CameraTypes.LICENSE_ERR_DISABLE_MEM_NOT_ENOUGH:
//                errorInfo = "内存不足，禁止";
//                break;
//            case CameraTypes.LICENSE_ERR_DISABLE_PARAMETER_DISACCORD:
//                errorInfo = "账号信息前后不一致，禁止";
//                break;
//            case CameraTypes.LICENSE_ERR_DISABLE_DIRECTORY_ERR:
//                errorInfo = "目录错误，禁止";
//                break;
//            case CameraTypes.LICENSE_ERR_DISABLE_SDK_NO_EXITS:
//                errorInfo = "sdk信息不存在，禁止";
//                break;
//            case CameraTypes.LICENSE_ERR_DISABLE_SDK_PLANTFORM_NO_SUPPORT:
//                errorInfo = "平台不支持，禁止";
//                break;
//
//            case CameraTypes.LICENSE_ERR_DISABLE_NO_UPDATE:
//                errorInfo = "无更新，禁止";
//                break;
//            case CameraTypes.LICENSE_ERR_DISABLE_NETWORK:
//                errorInfo = "网络错误，禁止";
//                break;
//            case CameraTypes.LICENSE_ERR_DISABLE_DATA_FORMAT:
//                errorInfo = "license格式错误，禁止";
//                break;
//
//            case CameraTypes.LICENSE_ERR_ENABLE_SDK_EXPIREDATE:
//                errorInfo = "sdk过期";
//                break;
//            case CameraTypes.LICENSE_ERR_ENABLE_NO_UPDATE:
//                errorInfo = "license没更新";
//                break;
//            case CameraTypes.LICENSE_ERR_ENABLE_NETWORK:
//                errorInfo = "网络错误";
//                break;
//            case CameraTypes.LICENSE_ERR_ENABLE_DATA_FORMAT:
//                errorInfo = "license格式错误";
//                break;
//            case CameraTypes.MEDIA_ERR_RECORDER_UNSUPPORT_RESOLUTION:
//                errorInfo = "分辨率不支持";
//                break;
//            case CameraTypes.CAMERA_NOT_SUPPORT_RESOLUTION:
//                errorInfo = "分辨率不支持";
//                break;
//            default:
//                errorInfo = "未知错误! code=" + res;
//                break;
//        }
//        return errorInfo;
//    }
//}
